package com.zline.foodraise.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by heshantao on 15/9/9.
 * 服务器接口获得模板信息
 */
public class TemplateBean implements Parcelable {
    //android 图片模板地址
    private String androidImgUrl;
    //android 模板图片的镂空部分左上角X 相对图片的像素
    private float androidImgX;
    //android 模板图片的镂空部分左上角Y 相对图片的像素
    private float androidImgY;
    //android 模板图片的镂空部分高度
    private int androidImgHeight;
    //android 模板图片的镂空部分宽度
    private int androidImgWidth;
    //是否是系统模板
    private int isSystem;
    //项目ID
    private int projectId;
    //模板ID
    private int templateId;
    //缩略图地址
    private String thumbnails;
    //更新时间戳
    private int updateTimeStamp;

    public TemplateBean() {
    }

    public TemplateBean(int androidImgHeight, String androidImgUrl, int androidImgWidth,
                        float androidImgX, float androidImgY, int isSystem, int projectId,
                        int templateId, String thumbnails, int updateTimeStamp) {
        this.androidImgHeight = androidImgHeight;
        this.androidImgUrl = androidImgUrl;
        this.androidImgWidth = androidImgWidth;
        this.androidImgX = androidImgX;
        this.androidImgY = androidImgY;
        this.isSystem = isSystem;
        this.projectId = projectId;
        this.templateId = templateId;
        this.thumbnails = thumbnails;
        this.updateTimeStamp = updateTimeStamp;
    }

    public void setAndroidImgUrl(String androidImgUrl) {
        this.androidImgUrl = androidImgUrl;
    }


    public void setIsSystem(int isSystem) {
        this.isSystem = isSystem;
    }

    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    public void setTemplateId(int templateId) {
        this.templateId = templateId;
    }

    public void setThumbnails(String thumbnails) {
        this.thumbnails = thumbnails;
    }

    public void setUpdateTimeStamp(int updateTimeStamp) {
        this.updateTimeStamp = updateTimeStamp;
    }

    public String getAndroidImgUrl() {
        return androidImgUrl;
    }
    public int getIsSystem() {
        return isSystem;
    }

    public int getProjectId() {
        return projectId;
    }

    public int getTemplateId() {
        return templateId;
    }

    public String getThumbnails() {
        return thumbnails;
    }

    public int getUpdateTimeStamp() {
        return updateTimeStamp;
    }

    public int getAndroidImgHeight() {
        return androidImgHeight;
    }

    public void setAndroidImgHeight(int androidImgHeight) {
        this.androidImgHeight = androidImgHeight;
    }

    public int getAndroidImgWidth() {
        return androidImgWidth;
    }

    public void setAndroidImgWidth(int androidImgWidth) {
        this.androidImgWidth = androidImgWidth;
    }

    public float getAndroidImgX() {
        return androidImgX;
    }

    public void setAndroidImgX(float androidImgX) {
        this.androidImgX = androidImgX;
    }

    public float getAndroidImgY() {
        return androidImgY;
    }

    public void setAndroidImgY(float androidImgY) {
        this.androidImgY = androidImgY;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.androidImgUrl);
        dest.writeFloat(this.androidImgX);
        dest.writeFloat(this.androidImgY);
        dest.writeInt(this.androidImgHeight);
        dest.writeInt(this.androidImgWidth);
        dest.writeInt(this.isSystem);
        dest.writeInt(this.projectId);
        dest.writeInt(this.templateId);
        dest.writeString(this.thumbnails);
        dest.writeInt(this.updateTimeStamp);
    }

    protected TemplateBean(Parcel in) {
        this.androidImgUrl = in.readString();
        this.androidImgX = in.readFloat();
        this.androidImgY = in.readFloat();
        this.androidImgHeight = in.readInt();
        this.androidImgWidth = in.readInt();
        this.isSystem = in.readInt();
        this.projectId = in.readInt();
        this.templateId = in.readInt();
        this.thumbnails = in.readString();
        this.updateTimeStamp = in.readInt();
    }

    public static final Creator<TemplateBean> CREATOR = new Creator<TemplateBean>() {
        public TemplateBean createFromParcel(Parcel source) {
            return new TemplateBean(source);
        }

        public TemplateBean[] newArray(int size) {
            return new TemplateBean[size];
        }
    };
}
